<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>媒体查询</title>
    <style>
        /* 最好按顺序写，从小往大先max后min, 从大往小先min后max */
        /* 这里可以直接写 */
        /* body {
            background: skyblue;
        } */
        
        @media screen and (max-width: 539px) {
            body {
                background: skyblue;
            }
        }
        /* 多个属性时的写法 */
        /* @media screen and (min-width:540px) and (max-width: 969px) {} */
        
        @media screen and (min-width:540px) {
            body {
                background: green;
            }
        }
        
        @media screen and (min-width: 970px) {
            body {
                background: pink;
            }
        }
    </style>
</head>

<body>

</body>

</html>